import requests

def proxy_pool():
    url = input('输入代理网址\n')
    headers = {
        'User-Agent': ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)'
                       'Chrome/91.0.4472.101 Safari/537.36')
    }
    page_text = requests.get(url=url, headers=headers).text
    proxy_list = page_text.split('<br>')
    http_proxy = []  # 代理池
    for proxy in proxy_list:
    # request的代理方式
    #     dic = {
    #         'http': 'http://'+proxy
    #     }

    # 异步的代理方式
        dic = 'http://'+proxy
        http_proxy.append(dic)
        print(f'提取的代理 : {dic}')
    return http_proxy
